package com.qf.mapper;

import com.qf.dto.ContractorDto;
import com.qf.model.Contractor;
import com.qf.model.Project;
import com.qf.model.Subitem;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SubitemMapper {

    //当前页结果
    public List<Subitem> findPage(@Param("currentPage")Integer currentPage, @Param("pageSize")Integer pageSize, @Param("queryString")String queryString);

    //总记录数
    public Long count(String queryString);
    //增加开发商
    public int addOne(Subitem subitem);


    //根据suid查询subitem
    public Subitem findById( String suid);

    //修改subitem
    int editOne(Subitem subitem);

    //删除contractor
    int delete(String suid);

    @Select("select * from subitem where status =1")
    List<Subitem> findAll();

    @Select("select * from subitem where pid=#{pid} and status=1 ")
    List<Subitem> findByPid (int pid);
    }
